package phapp.model.custom;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import javacommon.base.BaseEntity;

/**
 * Title: t_custom_info 数据类 POJO Description: DAO层映射到数据类,页面封装数据映射到数据类 Copyright:
 * Copyright (c) 2012-10 Company:
 * 
 * @author you name
 * @version 1.0
 */

public class Custom extends BaseEntity
{
   // date formats
   public static final String FORMAT_CREATE_DATE = DATE_TIME_FORMAT;
   public static final String FORMAT_UPDATE_DATE = DATE_TIME_FORMAT;
   public static final String FORMAT_LAST_LOGINDATE = DATE_TIME_FORMAT;

   // columns START
   /** custId */
   private java.lang.Integer custId;
   /** thirdAccount */
   private java.lang.String thirdAccount;
   /** custAccount */
   private java.lang.String custAccount;
   /** custName */
   private java.lang.String custName;
   /** custPasswd */
   private java.lang.String custPasswd;
   /** custMobile */
   private java.lang.String custMobile;
   /** custEmail */
   private java.lang.String custEmail;
   /** custCity */
   private java.lang.String custCity;
   /** custSex */
   private java.lang.Integer custSex;
   /** custBirthday */
   private java.lang.String custBirthday;
   /** custVocation */
   private java.lang.String custVocation;
   /** custImgfile */
   private java.lang.String custImgfile;
   /** custImgurl */
   private java.lang.String custImgurl;
   /** custStatus */
   private java.lang.Integer custStatus;
   /** curveType */
   private java.lang.Integer curveType;
   /** totalStar */
   private java.lang.Integer totalStar;
   private java.lang.Integer praiseCount;
   /** wishCount */
   private java.lang.Integer wishCount;
   /** otherwishCount */
   private java.lang.Integer otherwishCount;
   /** attentionCount */
   private java.lang.Integer attentionCount;
   /** createDate */
   private java.sql.Timestamp createDate;
   /** updateDate */
   private java.sql.Timestamp updateDate;
   /** lastLogindate */
   private java.sql.Timestamp lastLogindate;
   /** loginCount */
   private java.lang.Integer loginCount;

   private java.lang.Integer registDaycount;
   
   private java.util.ArrayList idList;

   // columns END

   public Custom()
   {
   }

   public java.lang.Integer getPraiseCount()
   {
      return praiseCount;
   }

   public void setPraiseCount(java.lang.Integer praiseCount)
   {
      this.praiseCount = praiseCount;
   }

   public Custom(java.lang.Integer custId)
   {
      this.custId = custId;
   }

   public void setId(java.lang.Integer value)
   {
      this.custId = value;
   }

   public java.lang.Integer getId()
   {
      return this.custId;
   }
   
   public void setCustId(java.lang.Integer value)
   {
      this.custId = value;
   }

   public java.lang.Integer getCustId()
   {
      return this.custId;
   }

   public java.lang.Integer getRegistDaycount()
   {
      return registDaycount;
   }

   public void setRegistDaycount(java.lang.Integer registDaycount)
   {
      this.registDaycount = registDaycount;
   }
   
   public void setThirdAccount(java.lang.String value)
   {
      this.thirdAccount = value;
   }

   public java.lang.String getThirdAccount()
   {
      return this.thirdAccount;
   }

   public void setCustAccount(java.lang.String value)
   {
      this.custAccount = value;
   }

   public java.lang.String getCustAccount()
   {
      return this.custAccount;
   }

   public void setCustName(java.lang.String value)
   {
      this.custName = value;
   }

   public java.lang.String getCustName()
   {
      return this.custName;
   }

   public void setCustPasswd(java.lang.String value)
   {
      this.custPasswd = value;
   }

   public java.lang.String getCustPasswd()
   {
      return this.custPasswd;
   }

   public void setCustMobile(java.lang.String value)
   {
      this.custMobile = value;
   }

   public java.lang.String getCustMobile()
   {
      return this.custMobile;
   }

   public void setCustEmail(java.lang.String value)
   {
      this.custEmail = value;
   }

   public java.lang.String getCustEmail()
   {
      return this.custEmail;
   }

   public void setCustCity(java.lang.String value)
   {
      this.custCity = value;
   }

   public java.lang.String getCustCity()
   {
      return this.custCity;
   }

   public void setCustSex(java.lang.Integer value)
   {
      this.custSex = value;
   }

   public java.lang.Integer getCustSex()
   {
      return this.custSex;
   }

   public void setCustBirthday(java.lang.String value)
   {
      this.custBirthday = value;
   }

   public java.lang.String getCustBirthday()
   {
      return this.custBirthday;
   }

   public void setCustVocation(java.lang.String value)
   {
      this.custVocation = value;
   }

   public java.lang.String getCustVocation()
   {
      return this.custVocation;
   }

   public void setCustImgfile(java.lang.String value)
   {
      this.custImgfile = value;
   }

   public java.lang.String getCustImgfile()
   {
      return this.custImgfile;
   }

   public void setCustImgurl(java.lang.String value)
   {
      this.custImgurl = value;
   }

   public java.lang.String getCustImgurl()
   {
      return this.custImgurl;
   }

   public void setCustStatus(java.lang.Integer value)
   {
      this.custStatus = value;
   }

   public java.lang.Integer getCustStatus()
   {
      return this.custStatus;
   }

   public void setCurveType(java.lang.Integer value)
   {
      this.curveType = value;
   }

   public java.lang.Integer getCurveType()
   {
      return this.curveType;
   }

   public void setTotalStar(java.lang.Integer value)
   {
      this.totalStar = value;
   }

   public java.lang.Integer getTotalStar()
   {
      return this.totalStar;
   }

   public void setWishCount(java.lang.Integer value)
   {
      this.wishCount = value;
   }

   public java.lang.Integer getWishCount()
   {
      return this.wishCount;
   }

   public void setOtherwishCount(java.lang.Integer value)
   {
      this.otherwishCount = value;
   }

   public java.lang.Integer getOtherwishCount()
   {
      return this.otherwishCount;
   }

   public void setAttentionCount(java.lang.Integer value)
   {
      this.attentionCount = value;
   }

   public java.lang.Integer getAttentionCount()
   {
      return this.attentionCount;
   }

   public String getCreateDateString()
   {
      return date2String(getCreateDate(), FORMAT_CREATE_DATE);
   }

   public void setCreateDateString(String value)
   {
      setCreateDate(string2Date(value, FORMAT_CREATE_DATE, java.sql.Timestamp.class));
   }

   public void setCreateDate(java.sql.Timestamp value)
   {
      this.createDate = value;
   }

   public java.sql.Timestamp getCreateDate()
   {
      return this.createDate;
   }

   public String getUpdateDateString()
   {
      return date2String(getUpdateDate(), FORMAT_UPDATE_DATE);
   }

   public void setUpdateDateString(String value)
   {
      setUpdateDate(string2Date(value, FORMAT_UPDATE_DATE, java.sql.Timestamp.class));
   }

   public void setUpdateDate(java.sql.Timestamp value)
   {
      this.updateDate = value;
   }

   public java.sql.Timestamp getUpdateDate()
   {
      return this.updateDate;
   }

   public String getLastLogindateString()
   {
      return date2String(getLastLogindate(), FORMAT_LAST_LOGINDATE);
   }

   public void setLastLogindateString(String value)
   {
      setLastLogindate(string2Date(value, FORMAT_LAST_LOGINDATE, java.sql.Timestamp.class));
   }

   public void setLastLogindate(java.sql.Timestamp value)
   {
      this.lastLogindate = value;
   }

   public java.sql.Timestamp getLastLogindate()
   {
      return this.lastLogindate;
   }

   public void setLoginCount(java.lang.Integer value)
   {
      this.loginCount = value;
   }

   public java.lang.Integer getLoginCount()
   {
      return this.loginCount;
   }

   public java.util.ArrayList getIdList()
   {
      return idList;
   }

   public void setIdList(java.util.ArrayList idList)
   {
      this.idList = idList;
   }

   /** 手动增加属性后,toString,hashCode,equals都要修改 */
   public String toString()
   {
      return new ToStringBuilder(this).append("CustId", getCustId()).append("ThirdAccount", getThirdAccount())
               .append("CustAccount", getCustAccount()).append("CustName", getCustName()).append("CustPasswd", getCustPasswd())
               .append("CustMobile", getCustMobile()).append("CustEmail", getCustEmail()).append("CustCity", getCustCity())
               .append("CustSex", getCustSex()).append("CustBirthday", getCustBirthday())
               .append("CustVocation", getCustVocation()).append("CustImgfile", getCustImgfile())
               .append("CustImgurl", getCustImgurl()).append("CustStatus", getCustStatus()).append("CurveType", getCurveType())
               .append("TotalStar", getTotalStar()).append("WishCount", getWishCount())
               .append("OtherwishCount", getOtherwishCount()).append("AttentionCount", getAttentionCount())
               .append("CreateDate", getCreateDate()).append("UpdateDate", getUpdateDate())
               .append("LastLogindate", getLastLogindate()).append("LoginCount", getLoginCount()).toString();
   }

   public int hashCode()
   {
      return new HashCodeBuilder().append(getCustId()).append(getThirdAccount()).append(getCustAccount()).append(getCustName())
               .append(getCustPasswd()).append(getCustMobile()).append(getCustEmail()).append(getCustCity())
               .append(getCustSex()).append(getCustBirthday()).append(getCustVocation()).append(getCustImgfile())
               .append(getCustImgurl()).append(getCustStatus()).append(getCurveType()).append(getTotalStar())
               .append(getWishCount()).append(getOtherwishCount()).append(getAttentionCount()).append(getCreateDate())
               .append(getUpdateDate()).append(getLastLogindate()).append(getLoginCount()).toHashCode();
   }

   public boolean equals(Object obj)
   {
      if(obj instanceof Custom == false) return false;
      if(this == obj) return true;
      Custom other = (Custom) obj;
      return new EqualsBuilder().append(getCustId(), other.getCustId()).append(getThirdAccount(), other.getThirdAccount())
               .append(getCustAccount(), other.getCustAccount()).append(getCustName(), other.getCustName())
               .append(getCustPasswd(), other.getCustPasswd()).append(getCustMobile(), other.getCustMobile())
               .append(getCustEmail(), other.getCustEmail()).append(getCustCity(), other.getCustCity())
               .append(getCustSex(), other.getCustSex()).append(getCustBirthday(), other.getCustBirthday())
               .append(getCustVocation(), other.getCustVocation()).append(getCustImgfile(), other.getCustImgfile())
               .append(getCustImgurl(), other.getCustImgurl()).append(getCustStatus(), other.getCustStatus())
               .append(getCurveType(), other.getCurveType()).append(getTotalStar(), other.getTotalStar())
               .append(getWishCount(), other.getWishCount()).append(getOtherwishCount(), other.getOtherwishCount())
               .append(getAttentionCount(), other.getAttentionCount()).append(getCreateDate(), other.getCreateDate())
               .append(getUpdateDate(), other.getUpdateDate()).append(getLastLogindate(), other.getLastLogindate())
               .append(getLoginCount(), other.getLoginCount()).isEquals();
   }
}
